#ifndef CELL_H
#define CELL_H
#include<QTableWidgetItem>
class Cell:public QTableWidgetItem
{
public:
    Cell();
    QTableWidgetItem* clone() const;
    void setData(int role, const QVariant &value);
    void setDirty();
    QVariant data(int role) const;
    QString formula() const;
    void setFormula(const QString &formula);
private:
    mutable QVariant cacheValue;//error: assignment of member 'Cell::cacheIsDirty' in read-only object

    mutable bool cacheIsDirty;
    QVariant value()const;
    QVariant evalExpression(const QString&str,int& pos)const;
    QVariant evalTerm(const QString &str, int &pos) const;
    QVariant evalFactor(const QString &str, int &pos) const;
};

#endif // CELL_H
